﻿<!doctype html>
<html>
<!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>任务统计</title>
<!-- InstanceEndEditable -->
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/checkLogin.js"></script> 
<link href="../css/Pager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery.pager.js"></script>
<script type="text/javascript" src="../js/gbRst.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/checkLogin.js"></script> 
	<script charset="utf-8" src="../js/find.js"></script>
	<link rel="stylesheet" href="../css/default.css" />
<script type="text/javascript" src="../js/manhuaDate.1.0.js"></script> 
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/highcharts.js"></script>
<script type="text/javascript" src="../js/exporting_1.js"></script>
<script type="text/javascript" src="../js/huituUtils.js"></script>
<script type="text/javascript">
$(function(){
	$(".hideDiv").each(function(){
		addMargin($(this));
	})
	$("input[type='file']").change(function(){
		$(this).prev().prev().val($(this).val())
	})
	$("#status").change(function(){
		if($("#status").val()==2){
			$("#showNextTime").show()
		}else{
			$("#showNextTime").hide()
		}
	})
	
	 $("#dtBegin").val(getToday());
	$("#dtEnd").val(getToday()); 
});

var shopPageCount=0;
var shopCount=0;
var pageCount=0;
var pageIndex=1;
var resultIndex=1;
var resultId = null;
$(function(){

	$(".hideDiv").each(function(){
		addMargin($(this));
	})
	
});




function search2(){
	InitShopList(0);
}

function makeParam(json){
	var param = [];
		for(m=0;m<json.result.data.length;m++){
		var count =getHtmlInt( getHeadIndexValue(m, json, "count")) 
		var name = getHtmlInt( getHeadIndexValue(m, json, "name"))

		var value=[name+"次数 "+count,count]
		param[m] = value;
		}
	huitu("container1", param, "任务统计", "所占比例：");

	//highChars(param,"新注册会员统计","注册数：");
}

function getFucnMenuDetailList(page){
	if(IsEmpty(page)){
		pageIndex=1
	}else{
		pageIndex = page
	}
	var dtBegin = $("#dtBegin").val();
	var dtEnd  = $("#dtEnd").val();
	var remindId = $("#remindID").val();
	
	param={'dtCreateBegin':dtBegin,'dtCreateEnd':dtEnd,'remindId':remindId}
	 var tj = _findInfo("../taskRemind/find/getTj", param);
		if(IsNotEmpty(tj)&&tj.state==0){
			makeParam(tj)
		}
	
	 adList = _findInfo("../taskRemind/find/getCountOfMember/"+(pageIndex -1)+"/10", param);
	if(adList.state==0){
		$("#funcMenuList tbody").empty();
		 for ( var i = 0; i < adList.result.data.length; i++) {
				var htm = "<tr>";
			 htm+= "<td>"+ _getStringOfJson(i, adList, "username").substring(0,10)+"</td>";
				htm+="<td>"+ _getStringOfJson(i, adList, "managerName")+"</td>";
				htm+="<td>"+ _getStringOfJson(i, adList, "typeName")+"</td>";
				htm+="<td>"+ _getStringOfJson(i, adList, "count")+"</td>";
				htm+="<td>"+ _getStringOfJson(i, adList, "doneCount")+"</td>";
				var count = _getIntOfJson(i, adList, "count")
			var doneCount = _getIntOfJson(i, adList, "doneCount")
			var v = ((doneCount/count)*100).toFixed(2)+"%"
			htm+="<td>"+v+"</td>";
			htm+= "</tr>"
			$("#funcMenuList tbody").append(htm)
		}
		 _loadPage("pager", pageIndex, 10, adList, getFucnMenuDetailList, "NoResult")
		$("#sup").html("共"+adList.result.len+"条");	
		
		 
	}
	
}






</script>


</head>

<body>
<!-- InstanceBeginEditable name="EditRegion3" --> 
<div id="yinying"></div>
<div id="yinying1"></div>


<script type="text/javascript">
$(function(){
	refreshInput($(".serWrapper"));
		$(this).prev().prev().val($(this).val())
		
	})
	

</script>


<div class="container" id="container">
  <div class="container_R fr">
    <div class="place">任务统计</div>
    <div class="member_search">
      <p>
       <!--  <span>任务类型：</span>
			<select id="remindID">
			<option value="">全部</option>
			
			<option value="8">看房预约</option>
			
			</select> -->
       <span>起始日期：</span>
		<input id="dtBegin" class="doubledate" type="text" value="" >
		 <span>截止日期：</span>
		<input id="dtEnd" class="doubledate" type="text" value="">
        		<input class="btn" id="research" name="查询" type="button" value="查询" onClick="getFucnMenuDetailList(1)" ></p>
		<p>
		
		<div class="shadow yesterday_all" id="bigBox">
<!--     	<h2 class="title">关键指标详解<div id="sub"><span class="focus" id="sub_s1">新增会员</span><span id="sub_s2">累积会员</span></div></h2>
 --><!--     	<div class="search_term"><span>起始日期：</span><input type="text" readonly class="doubledate ipticon"  id="dtBegin"/><span>截止时间：</span><input type="text" readonly class="doubledate ipticon" id="dtEnd"/><input type="button" id="search_btn1" class="search_btn common_btn" onclick="findMemberCount(1)" value="查询"><input type="button" id="search_btn2" style="display: none;" class="search_btn common_btn" onclick="findMemberCount(2)" value="查询"></div>
 -->        	<div class="box_img">
            	<h4>统计图</h4>
                <div class="line_img"><div id="container1" style="width: 100%; height: 400px; margin: 0 auto"></div></div>
            </div>
            
          <div>
      
          </div>   
        	   
    </div>
        </div>
       <table width="100%" class="member_list" cellpadding="0" cellspacing="1" border="0" id="funcMenuList">
    	<caption><strong>统计列表       <span id="sup">共0条</span>  </strong>
<!--     	<input type="button" class="common_btn" value="增加" onclick="toAdd()">
 -->    	</caption>
    	<thead>
    	<tr>
        	<th >顾问姓名</th>
        	<th >对应客户经理</th>
        	<th >任务类型</th>
        	<th >任务数量</th>
        	<th >已完成数量</th>
        	<th >完成率</th>
        </tr>
        </thead>
       	<tbody>
       		
       	</tbody>
    </table>
      <div id="NoResult"  class="Nothing" style="text-align:center;display: none;">无符合条件的数据！</div>
    <div id="pager"></div>
  </div>
  <div class="fc"></div>
</div>
<!-- InstanceEndEditable --> 
<script type="text/javascript" src="../js/header.js"></script> 
<script type="text/javascript" src="../js/left.js"></script> 
<script type="text/javascript" src="../js/footer.js"></script> 
<script type="text/javascript">
clearThis("absoluteTxt");
showTab(5,3);
</script>
</body>
<!-- InstanceEnd -->
</html>
